Optimal. Leaf size=216 \[ -\frac{2 d \tan (e+f x) \sqrt{\frac{a+b \sec (e+f x)}{a+b}} \Pi \left (\frac{2 d}{c+d};\sin ^{-1}\left (\frac{\sqrt{1-\sec (e+f x)}}{\sqrt{2}}\right )|\frac{2 b}{a+b}\right )}{c f (c+d) \sqrt{-\tan ^2(e+f x)} \sqrt{a+b \sec (e+f x)}}-\frac{2 \sqrt{a+b} \cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} \Pi \left (\frac{a+b}{a};\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.238235, antiderivative size = 216, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3930, 3784, 3973} \[ -\frac{2 d \tan (e+f x) \sqrt{\frac{a+b \sec (e+f x)}{a+b}} \Pi \left (\frac{2 d}{c+d};\sin ^{-1}\left (\frac{\sqrt{1-\sec (e+f x)}}{\sqrt{2}}\right )|\frac{2 b}{a+b}\right )}{c f (c+d) \sqrt{-\tan ^2(e+f x)} \sqrt{a+b \sec (e+f x)}}-\frac{2 \sqrt{a+b} \cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} \Pi \left (\frac{a+b}{a};\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right )}{a c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3930
Rule 3784
Rule 3973
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{a+b \sec (e+f x)} (c+d \sec (e+f x))} \, dx &=\frac{\int \frac{1}{\sqrt{a+b \sec (e+f x)}} \, dx}{c}-\frac{d \int \frac{\sec (e+f x)}{\sqrt{a+b \sec (e+f x)} (c+d \sec (e+f x))} \, dx}{c}\\ &=-\frac{2 \sqrt{a+b} \cot (e+f x) \Pi \left (\frac{a+b}{a};\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a+b}}\right )|\frac{a+b}{a-b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{a c f}-\frac{2 d \Pi \left (\frac{2 d}{c+d};\sin ^{-1}\left (\frac{\sqrt{1-\sec (e+f x)}}{\sqrt{2}}\right )|\frac{2 b}{a+b}\right ) \sqrt{\frac{a+b \sec (e+f x)}{a+b}} \tan (e+f x)}{c (c+d) f \sqrt{a+b \sec (e+f x)} \sqrt{-\tan ^2(e+f x)}}\\ \end{align*}
Mathematica [A] time = 9.95483, size = 254, normalized size = 1.18 \[ -\frac{2 \sec ^{\frac{3}{2}}(e+f x) \sqrt{\sec (e+f x)+1} \sqrt{\cos (e+f x) \sec ^2\left (\frac{1}{2} (e+f x)\right )} \sqrt{\frac{a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}} (c \cos (e+f x)+d) \left (c (c+d) \text{EllipticF}\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right ),\frac{a-b}{a+b}\right )+2 \left (c^2-d^2\right ) \Pi \left (-1;-\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right )|\frac{a-b}{a+b}\right )+2 d^2 \Pi \left (\frac{c-d}{c+d};-\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right )|\frac{a-b}{a+b}\right )\right )}{c f (c-d) (c+d) \sqrt{\sec ^2\left (\frac{1}{2} (e+f x)\right )} \sqrt{a+b \sec (e+f x)} (c+d \sec (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.31, size = 318, normalized size = 1.5 \begin{align*} -2\,{\frac{ \left ( 1+\cos \left ( fx+e \right ) \right ) ^{2} \left ( -1+\cos \left ( fx+e \right ) \right ) }{cf \left ( c+d \right ) \left ( c-d \right ) \left ( a\cos \left ( fx+e \right ) +b \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{2}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}} \left ({c}^{2}{\it EllipticF} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) +d{\it EllipticF} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) c-2\,{c}^{2}{\it EllipticPi} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},-1,\sqrt{{\frac{a-b}{a+b}}} \right ) +2\,{\it EllipticPi} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},-1,\sqrt{{\frac{a-b}{a+b}}} \right ){d}^{2}-2\,{\it EllipticPi} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},{\frac{c-d}{c+d}},\sqrt{{\frac{a-b}{a+b}}} \right ){d}^{2} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{b \sec \left (f x + e\right ) + a}{\left (d \sec \left (f x + e\right ) + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a + b \sec{\left (e + f x \right )}} \left (c + d \sec{\left (e + f x \right )}\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{b \sec \left (f x + e\right ) + a}{\left (d \sec \left (f x + e\right ) + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]